diff --git a/astropy/coordinates/sky_coordinate.py b/astropy/coordinates/sky_coordinate.py
index ab475f7d0d..9c2de1a412 100644
--- a/astropy/coordinates/sky_coordinate.py
+++ b/astropy/coordinates/sky_coordinate.py
@@ -871,33 +871,43 @@ class SkyCoord(ShapedLikeNDArray):
         Overrides getattr to return coordinates that this can be transformed
         to, based on the alias attr in the primary transform graph.
         """
+        print(f"__getattr__ called with attr: {attr}")
         if "_sky_coord_frame" in self.__dict__:
+            print(f"Checking if _sky_coord_frame has attr: {attr}")
             if self._is_name(attr):
+                print(f"attr is _sky_coord_frame name: {attr}")
                 return self  # Should this be a deepcopy of self?
 
             # Anything in the set of all possible frame_attr_names is handled
             # here. If the attr is relevant for the current frame then delegate
             # to self.frame otherwise get it from self._<attr>.
             if attr in frame_transform_graph.frame_attributes:
+                print(f"attr is in frame_transform_graph.frame_attributes: {attr}")
                 if attr in self.frame.frame_attributes:
+                    print(f"attr is in self.frame.frame_attributes: {attr}")
                     return getattr(self.frame, attr)
                 else:
+                    print(f"attr is not in self.frame.frame_attributes: {attr}")
                     return getattr(self, "_" + attr, None)
 
             # Some attributes might not fall in the above category but still
             # are available through self._sky_coord_frame.
             if not attr.startswith("_") and hasattr(self._sky_coord_frame, attr):
+                print(f"attr is available through self._sky_coord_frame: {attr}")
                 return getattr(self._sky_coord_frame, attr)
 
             # Try to interpret as a new frame for transforming.
             frame_cls = frame_transform_graph.lookup_name(attr)
             if frame_cls is not None and self.frame.is_transformable_to(frame_cls):
+                print(f"attr is transformable to frame_cls: {attr}")
                 return self.transform_to(attr)
 
         # Fail
-        raise AttributeError(
-            f"'{self.__class__.__name__}' object has no attribute '{attr}'"
-        )
+        if attr not in self.__dict__ and not hasattr(self.__class__, attr):
+            print(f"Raising AttributeError for attr: {attr}")
+            raise AttributeError(
+                f"'{self.__class__.__name__}' object has no attribute '{attr}'"
+            )
 
     def __setattr__(self, attr, val):
         # This is to make anything available through __getattr__ immutable
